package com.itheima;

/***
 *@title a03oopextendsdemo03
 *@description <TODO description class purpose>
 *@author 12468
 *@version 1.0.0
 *@create 2024/10/18 23:36
 **/
public class a03oopextendsdemo03 {
    public static void main(String[] args) {
        OverseasStudent student = new OverseasStudent();
        student.lunch();
    }
}

class OverseasStudent extends Student {
    public void lunch() {
        eat();
        drink();

        super.eat();
        super.drink();
    }

    public void eat() {
        System.out.println("吃意大利面");
    }

    public void drink() {
        System.out.println("喝凉水");
    }
}

class Person {
    public void eat() {
        System.out.println("吃米饭");
    }

    public void drink() {
        System.out.println("喝开水");
    }
}

class Student extends Person {
    public void lunch() {
        eat();
        drink();

        super.eat();
        super.drink();
    }
}